<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/html/axios.min.js"></script>
    <script src="room.js"></script>
    <link rel="stylesheet" href="room.css">
</head>
<body>
    <table border="1" width="80%" cellspacing="0">
        <thead><tr><th>房间地址</th><th>可容纳人数</th><th>已住人数</th><th>房间状态</th><th>房间类型</th><th>操作</th></tr></thead>
        <tbody id="roomData">

        </tbody>
    </table>
    <div id="pageDiv"></div>

    <!--动态查询-->
    <div>
        房间地址：<input type="text" id="address">
        房间状态：<select id="state">
            <option>不限</option>
            <option>正常</option>
            <option>设施损坏</option>
        </select><br>
        可住房间：<select id="canLive">
            <option>不限</option>
            <option>可住房间</option>
        </select>
        房间类型：<select id="type">
            <option>不限</option>
            <option>男生宿舍</option>
            <option>女生宿舍</option>
        </select><br>
        <input type="button" value="查找" onclick="findByItem(1)">
    </div>

    <input type="button" value="添加房间" onclick="showAddRoom()" style="margin-top: 10px"><br>
    <!--添加房间-->
    <div class="showDiv" id="addDiv">
        <div class="contentDiv" >
            房间地址：<input type="text" id="addressInfo"><br>
            可容纳人数：<input type="text" id="maxNumInfo"><br>
            房间类型：<select id="addType">
                <option>男生宿舍</option>
                <option>女生宿舍</option>
            </select><br>
            <img src="" width="100px" height="100px" style="border: 1px solid #000" id="roomImg">
            图片：<input type="file" id="myFile" name="image" onchange="fileChange()"><br>
            <input type="button" value="添加" onclick="addRoom()">
        </div>
    </div>
    <!--查看房间-->
    <div class="showDiv" id="findDiv">
        <div class="contentDiv">
            房间地址：<span id="showSite"></span><br>
            可容纳人数：<span id="showMaxNum"></span><br>
            房间状态：<span id="showState"></span>
            已住人数：<span id="showNum"></span>
            房间类型：<span id="showType"></span>
            图片：<img src="" width="100px" height="100px" style="border: 1px solid #000" id="showImage">
            <input type="button" value="确定" onclick="hiddenDiv()">
        </div>
    </div>
</body>
</html>